package com.xxjh.brs.mapresources.service.impl;

import com.xxjh.brs.map.dto.ImageFile;
import com.xxjh.brs.map.dto.MapTileParam;
import com.xxjh.brs.map.dto.RangeParam;
import com.xxjh.brs.map.service.impl.MapServiceImpl;
import com.xxjh.brs.map.vo.DownloadProgress;
import com.xxjh.brs.map.vo.DownloadTask;
import com.xxjh.brs.mapresources.service.MapDownloadService;
import com.xxjh.brs.sftp.service.impl.PushSftpService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.File;

/**
 * @author CHENCHEN
 * @title 下载地图服务
 * @company 新兴际华科技（天津）有限公司
 * @create 2024-07-03 19:21
 */
@Slf4j
@Service
public class MapDownloadServiceImpl implements MapDownloadService {

    @Autowired
    private MapServiceImpl mapService;

    @Override
    public DownloadProgress getDownloadProgress(long taskId) {
        DownloadProgress progress = mapService.getDownloadProgress(taskId);
        return progress;
    }

    @Override
    public ImageFile downloadMapTile(MapTileParam mapTileParam) {
        return mapService.downloadMapTile(mapTileParam);
    }

    @Override
    public DownloadTask startDownloadTiles(RangeParam rangeParam) {
        return mapService.startDownloadTiles(rangeParam);
    }
}
